package net.sycu.guomy.ems.servlet.user;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sycu.guomy.ems.business.LoginService;
import net.sycu.guomy.ems.business.MessageService;
import net.sycu.guomy.ems.entity.MessageBean;
import net.sycu.guomy.ems.servlet.BaseServlet;

public class ShowMessageServlet extends BaseServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		MessageBean message = null;
		message = new MessageService().search(this.getIntegerParameter("MessageId"));
		request.setAttribute("message", message);
		request.getRequestDispatcher("./showMessage.jsp").forward(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doGet(request, response);
	}

}
